from django.conf.urls import url

from main.views.user import Users
from main.views.subscription import SubscriptionList, SubscriptionFollowerList
from main.views.message import SubscriptionMessage

urls = [
    # 登录(post)
    url(r'^login/$', Users.as_view(), name='login'),
    # 获取自己创建的公众号列表(get)
    url(r'^owned_subscription/$', SubscriptionList.as_view(),
        name='owned_subscriptions'),
    # 当前用户关注公众号(post)
    url(r'^follow/(?P<subscription_id>[0-9]+)/$',
        SubscriptionFollowerList.as_view(), name='follow_subscription'),
    # 获取与当前用户相关的消息(get)
    url(r'^messages/$', SubscriptionMessage.as_view(), name='user_messages'),
]
